import { createSlice } from '@reduxjs/toolkit';

// 定义初始状态
const initialState = {
  antdLanguageType: true, // 存储文章列表的
}; 

// 创建一个 Redux slice
const languageSlice = createSlice({
  name: 'antdLanguageType',
  initialState,
  reducers: {
    setChangeLanguageType: (state, {payload}) => {
      state.antdLanguageType = payload === 'zh' ? true : false;
    },
  },
});

// 导出action creators
export const { setChangeLanguageType } = languageSlice.actions;
// 导出reducer
export default languageSlice.reducer;